<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head><meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    <title>6.38. Groff-1.18.1.1</title>
    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print" />
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head>
  <body id="lfs" class="6.2">
    <div class="navheader">
      <div class="headertitles">
        <h4>Linux From Scratch - 版本 6.2</h4>
        <h3>第六章 安装系统基础软件</h3>
      </div>
      <ul class="headerlinks">
        <li class="prev">
          <a accesskey="p" href="grep.html" title="Grep-2.5.1a">后退</a>
          <p>Grep-2.5.1a</p>
        </li>
        <li class="next">
          <a accesskey="n" href="gzip.html" title="Gzip-1.3.5">前进</a>
          <p>Gzip-1.3.5</p>
        </li>
        <li class="up"><a accesskey="u" href="chapter06.html" title="第六章 安装系统基础软件">上一级</a></li>
        <li class="home"><a accesskey="h" href="../index.html" title="Linux From Scratch - 版本 6.2">首页</a></li>
      </ul>
    </div>
    <div class="wrap">
      <div class="titlepage">
        <h1 class="sect1">6.38. Groff-1.18.1.1</h1>
      </div>
      <div class="package">
        <p>Groff 软件包包含几个处理和格式化文本的程序。Groff 把标准的文本和特殊的命令翻译成格式化的输出，就像你在 man 手册页里看到的那样。</p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong><span class="segtitle">预计编译时间：</span></strong> <span class="seg">0.4 SBU</span>
            </div>
            <div class="seg">
              <strong><span class="segtitle">所需磁盘空间：</span></strong> <span class="seg">39.2 MB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation">
        <div class="titlepage">
          <h2 class="sect2">6.38.1. 安装 Groff</h2>
        </div>
        <p>应用下面的patch来添加 "<span class="quote">ascii8</span>" 和 "<span class="quote">nippon</span>" 设备到 Groff：</p>
        <pre class="userinput"><kbd class="command">patch -Np1 -i ../groff-1.18.1.1-debian_fixes-1.patch</kbd></pre>
        <div class="note">
          <div class="admonhead">
            <img alt="[Note]" src="../images/note.png" />
            <h3 class="admontitle">注意</h3>
          </div>
          <div class="admonbody">
            <p>这些设备在转换一些非 ISO-8859-1 编码的非英语的 man 手册页时，会用到。现在对于 Groff-1.19.x 没有同样功能的patch：</p>
          </div>
        </div>
        <p>许多屏幕字体没有 Unicode 的单引号和破折号。告诉 Groff 使用等价的 ASCII 字符：</p>
        <pre class="userinput"><kbd class="command">sed -i -e 's/2010/002D/' -e 's/2212/002D/' \
    -e 's/2018/0060/' -e 's/2019/0027/' font/devutf8/R.proto</kbd></pre>
		  <p>Groff 希望环境变量 <tt class="envar">PAGE</tt> 包含缺省的纸张尺寸。对于在美国的人来说，应当使用 <em class="parameter"><tt>PAGE=letter</tt></em> ，如果你住在其他地方，可能需要把 <em class="parameter"><tt>PAGE=letter</tt></em> 改成 <em class="parameter"><tt>PAGE=A4</tt></em> 。</p>
        <p>为编译 Groff 做准备：</p>
        <pre class="userinput"><kbd class="command">PAGE=<em class="replaceable"><tt>&lt;paper_size&gt;</tt></em> ./configure --prefix=/usr --enable-multibyte</kbd></pre>
        <p>编译软件包：</p>
        <pre class="userinput"><kbd class="command">make</kbd></pre>
        <p>这个软件包没有附带测试程序。</p>
        <p>安装软件包：</p>
        <pre class="userinput"><kbd class="command">make install</kbd></pre>
         <p>有些文档程序，比如 <span><strong class="command">xman</strong></span> ，没有下面的符号链接会不能正常工作：</p>
        <pre class="userinput"><kbd class="command">ln -sv eqn /usr/bin/geqn
ln -sv tbl /usr/bin/gtbl</kbd></pre>
      </div>
      <div class="content">
        <div class="titlepage">
          <a id="contents-groff" name="contents-groff"></a>
          <h2 class="sect2">6.38.2. Groff 的内容</h2>
        </div>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong><span class="segtitle">安装的程序：</span></strong> <span class="seg">addftinfo,
              afmtodit, eqn, eqn2graph, geqn(→eqn), grn, grodvi,
              groff, groffer, grog, grolbp, grolj4, grops, grotty, gtbl(→tbl), hpftodit, indxbib, lkbib, lookbib, mmroff, neqn,
              nroff, pfbtops, pic, pic2graph, post-grohtml, pre-grohtml,
              refer, soelim, tbl, tfmtodit, troff</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3><a id="id3688477" name="id3688477"></a>简要描述</h3>
          <table border="0">
            <col align="left" valign="top" />
            <tbody>
              <tr>
                <td><a id="addftinfo" name="addftinfo"></a><span class="term"><span><strong class="command">addftinfo</strong></span></span></td>
                <td><p>读取一个 troff 字体文件并增加一些 <span><strong class="command">groff</strong></span> 系统使用的附加点阵字体。</p></td>
              </tr>
              <tr>
                <td><a id="afmtodit" name="afmtodit"></a><span class="term"><span><strong class="command">afmtodit</strong></span></span></td>
                <td><p>建立同 <span><strong class="command">groff</strong></span> 和 <span><strong class="command">grops</strong></span> 一起使用的字体文件。</p></td>
              </tr>
              <tr>
                <td><a id="eqn" name="eqn"></a><span class="term"><span><strong class="command">eqn</strong></span></span></td>
                <td><p>将嵌于 troff 输入文件中的方程描述翻译成 <span><strong class="command">troff</strong></span> 能够理解的命令</p></td>
              </tr>
              <tr>
                <td><a id="eqn2graph" name="eqn2graph"></a><span class="term"><span><strong class="command">eqn2graph</strong></span></span></td>
                <td><p>把 EQN 等式转换成反图像</p></td>
              </tr>
              <tr>
                <td><a id="geqn" name="geqn"></a><span class="term"><span><strong class="command">geqn</strong></span></span></td>
                <td><p>指向 <span><strong class="command">eqn</strong></span> 的连接</p></td>
              </tr>
              <tr>
                <td><a id="grn" name="grn"></a><span class="term"><span><strong class="command">grn</strong></span></span></td>
                <td><p><span><strong class="command">groff</strong></span> 的 gremlin 文件预处理器</p></td>
              </tr>
              <tr>
                <td><a id="grodvi" name="grodvi"></a><span class="term"><span><strong class="command">grodvi</strong></span></span></td>
                <td><p><span><strong class="command">groff</strong></span> 的产生 TeX dvi 格式的驱动</p></td>
              </tr>
              <tr>
                <td><a id="groff" name="groff"></a><span class="term"><span><strong class="command">groff</strong></span></span></td>
                <td><p>groff 文档格式系统的前端。通常它调用 <span><strong class="command">troff</strong></span> 程序和对指定设备适用的后处理器</p></td>
              </tr>
              <tr>
                <td><a id="groffer" name="groffer"></a><span class="term"><span><strong class="command">groffer</strong></span></span></td>
                <td><p>把 groff 文件和 man 文档显示在 X 和 tty 上</p></td>
              </tr>
              <tr>
                <td><a id="grog" name="grog"></a><span class="term"><span><strong class="command">grog</strong></span></span></td>
                <td><p>读取文件然后猜测使用 <em class="parameter"><tt>-e</tt></em>, <em class="parameter"><tt>-man</tt></em>, <em class="parameter"><tt>-me</tt></em>, <em class="parameter"><tt>-mm</tt></em>, <em class="parameter"><tt>-ms</tt></em>, <em class="parameter"><tt>-p</tt></em>, <em class="parameter"><tt>-s</tt></em>, <em class="parameter"><tt>-t</tt></em> 中的哪个 <span><strong class="command">groff</strong></span> 参数来打印文件。并把带有这个参数的 <span><strong class="command">groff</strong></span> 命令输出到标准输出。</p></td>
              </tr>
              <tr>
                <td><a id="grolbp" name="grolbp"></a><span class="term"><span><strong class="command">grolbp</strong></span></span></td>
                <td><p>LBP-4 和 LBP-8 激光打印机系列的 <span><strong class="command">groff</strong></span> 驱动</p></td>
              </tr>
              <tr>
                <td><a id="grolj4" name="grolj4"></a><span class="term"><span><strong class="command">grolj4</strong></span></span></td>
                <td><p>产生适用于HP Laserjet4 打印机的 PCL5 格式的 <span><strong class="command">groff</strong></span> 驱动</p></td>
              </tr>
              <tr>
                <td><a id="grops" name="grops"></a><span class="term"><span><strong class="command">grops</strong></span></span></td>
                <td><p>将 GNU <span><strong class="command">troff</strong></span> 的输出翻译成 PostScript </p></td>
              </tr>
              <tr>
                <td><a id="grotty" name="grotty"></a><span class="term"><span><strong class="command">grotty</strong></span></span></td>
                <td><p>将 GNU <span><strong class="command">troff</strong></span> 的标准输出翻译成适合类打字机设备的格式</p></td>
              </tr>
              <tr>
                <td><a id="gtbl" name="gtbl"></a><span class="term"><span><strong class="command">gtbl</strong></span></span></td>
                <td><p>指向 <span><strong class="command">tbl</strong></span> 的连接</p></td>
              </tr>
              <tr>
                <td><a id="hpftodit" name="hpftodit"></a><span class="term"><span><strong class="command">hpftodit</strong></span></span></td>
                <td><p>使用 <span><strong class="command">groff -Tlj4</strong></span> 从一个 HP-tagged 字体文件中创建 groff 使用的字体文件。</p></td>
              </tr>
              <tr>
                <td><a id="indxbib" name="indxbib"></a><span class="term"><span><strong class="command">indxbib</strong></span></span></td>
                <td><p>建立同 <span><strong class="command">refer</strong></span>, <span><strong class="command">lookbib</strong></span>, <span><strong class="command">lkbib</strong></span> 一起使用的文件的文献数据库的反向列表</p></td>
              </tr>
              <tr>
                <td><a id="lkbib" name="lkbib"></a><span class="term"><span><strong class="command">lkbib</strong></span></span></td>
                <td><p>在文献数据库中搜索包括指定关键字的条目，并将其输出到标准输出</p></td>
              </tr>
              <tr>
                <td><a id="lookbib" name="lookbib"></a><span class="term"><span><strong class="command">lookbib</strong></span></span></td>
                <td><p>打印一个标准错误的提示，除非标准输入不是终端。从标准输入读入关键字搜索在指定文件中的文献数据库中的含有这些关键字的条目，并将结果输出到标准输出。</p></td>
              </tr>
              <tr>
                <td><a id="mmroff" name="mmroff"></a><span class="term"><span><strong class="command">mmroff</strong></span></span></td>
                <td><p>一个简易的 <span><strong class="command">groff</strong></span> 预处理器</p></td>
              </tr>
              <tr>
                <td><a id="neqn" name="neqn"></a><span class="term"><span><strong class="command">neqn</strong></span></span></td>
                <td><p>将方程格式化，使其成为适应 ASCII 输出的脚本</p></td>
              </tr>
              <tr>
                <td><a id="nroff" name="nroff"></a><span class="term"><span><strong class="command">nroff</strong></span></span></td>
                <td><p>这个脚本用 <span><strong class="command">nroff</strong></span> 命令仿真 <span><strong class="command">groff</strong></span> 命令</p></td>
              </tr>
              <tr>
                <td><a id="pfbtops" name="pfbtops"></a><span class="term"><span><strong class="command">pfbtops</strong></span></span></td>
                <td><p>将 <tt class="filename">.pfb</tt> 格式的 Postscript 字体翻译成 ASCII 码</p></td>
              </tr>
              <tr>
                <td><a id="pic" name="pic"></a><span class="term"><span><strong class="command">pic</strong></span></span></td>
                <td><p>将内嵌于 troff 或 TeX 输入文件中的图像编译成 <span><strong class="command">troff</strong></span> 或 TeX 理解的指令</p></td>
              </tr>
              <tr>
                <td><a id="pic2graph" name="pic2graph"></a><span class="term"><span><strong class="command">pic2graph</strong></span></span></td>
                <td><p>把 PIC 图表转换成反图像</p></td>
              </tr>
              <tr>
                <td><a id="post-grohtml" name="post-grohtml"></a><span class="term"><span><strong class="command">post-grohtml</strong></span></span></td>
                <td><p>将GNU <span><strong class="command">troff</strong></span> 的输出翻译成 HTML</p>
              </tr>
              <tr>
                <td><a id="pre-grohtml" name="pre-grohtml"></a><span class="term"><span><strong class="command">pre-grohtml</strong></span></span></td>
                <td><p>将GNU <span><strong class="command">troff</strong></span> 的输出翻译成 HTML</p></td>
              </tr>
              <tr>
                <td><a id="refer" name="refer"></a><span class="term"><span><strong class="command">refer</strong></span></span></td>
                <td><p>将一个文件拷贝到标准输出并丢弃 <span class="emphasis"><em>.[</em></span> 和 <span class="emphasis"><em>.]</em></span> 之间作为引用的内容和在 <span class="emphasis"><em>.R1</em></span> 和 <span class="emphasis"><em>.R2</em></span> 之间解释如何处理这些引用的命令</p></td>
              </tr>
              <tr>
                <td><a id="soelim" name="soelim"></a><span class="term"><span><strong class="command">soelim</strong></span></span></td>
                <td><p>读取文件将其中的 <span class="emphasis"><em>.so 文件</em></span> 表格替换为 <span class="emphasis"><em>文件</em></span> 的内容</p></td>
              </tr>
              <tr>
                <td><a id="tbl" name="tbl"></a><span class="term"><span><strong class="command">tbl</strong></span></span></td>
                <td><p>将内嵌于 troff 或者 TeX 输入文件中的表格编译成 <span><strong class="command">troff</strong></span> 或者 TeX 理解的指令</p></td>
              </tr>
              <tr>
                <td><a id="tfmtodit" name="tfmtodit"></a><span class="term"><span><strong class="command">tfmtodit</strong></span></span></td>
                <td><p>建立 <span><strong class="command">groff -Tdvi</strong></span> 使用的字体文件</p></td>
              </tr>
              <tr>
                <td><a id="troff" name="troff"></a><span class="term"><span><strong class="command">troff</strong></span></span></td>
                <td><p>和 Unix 的 <span><strong class="command">troff</strong></span> 高度兼容。一般运行 <span><strong class="command">groff</strong></span> 来调用它，<span><strong class="command">groff</strong></span> 依照合适的顺序并使用合适的参数来执行预处理程序和后处理程序。</p></td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="grep.html" title="Grep-2.5.1a">后退</a>
          <p>Grep-2.5.1a</p>
        </li>
        <li class="next">
          <a accesskey="n" href="gzip.html" title="Gzip-1.3.5">前进</a>
          <p>Gzip-1.3.5</p>
        </li>
        <li class="up"><a accesskey="u" href="chapter06.html" title="第六章 安装系统基础软件">上一级</a></li>
        <li class="home"><a accesskey="h" href="../index.html" title="Linux From Scratch - 版本 6.2">首页</a>.
        </li>
      </ul>
    </div>
</body></html>
